home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / audacity / plug-ins / tremolo.ny < prev    next >
Encoding:
Audacity Nyquits plug-in  |  2010-09-21  |  1.6 KB  |  42 lines

  1. ;nyquist plug-in
  2. ;version 3
  3. ;type process
  4. ;categories "http://lv2plug.in/ns/lv2core#ModulatorPlugin"
  5. ;name "Tremolo..."
  6. ;action "Applying Tremolo..."
  7. ;info "by Dominic Mazzoni, modified by David R. Sky\nReleased under terms of the GNU General Public License Version 2\n'Starting phase' sets where to start tremolo in the waveform cycle.\n'Wetness level' sets depth of tremolo - 0 percent is no tremolo,\n100 percent sweeps between zero and maximum volume.\n'Frequency' controls the speed of the oscillation - use higher\nfrequencies for faster oscillation."
  8.  
  9. ;control wave "Waveform type" choice "sine,triangle,sawtooth,inverse sawtooth,square" 0
  10. ;control phase "      Starting phase [degrees]" int "" 0 -180 180
  11. ;control amount "      Wetness level [percent]" int "" 40 0 100
  12. ;control lfo "      Frequency [Hz]" real "" 4.0 0.1 10.0
  13.  
  14. ; set tremolo *waveform* 
  15. (setq *waveform* (cond
  16. ((= wave 0) ; sine
  17. *sine-table*)
  18. ((= wave 1) ; triangle
  19. *tri-table*)
  20. ((= wave 2) ; sawtooth
  21. (abs-env (list (pwl 0 -1 .995  1 1 -1 1) (hz-to-step 1.0) t)))
  22. ((= wave 3) ; inverse sawtooth
  23. (abs-env (list (pwl 0 1 .995  -1 1 1 1) (hz-to-step 1.0) t)))
  24. (t ; square
  25. (abs-env (list (pwl 0 1 .495 1 .5 -1 .995 -1 1 1 1) (hz-to-step 1.0) t)))))
  26.  
  27.  
  28. ; check for negative [invalid] frequency value
  29. (cond ((<= lfo 0)
  30. (format nil 
  31. "Error\n\nYou have entered an invalid frequency of ~a Hz.   
  32. Please enter a frequency above 0 Hz." lfo))
  33. ;
  34. (t
  35. ; apply tremolo
  36. (mult (sum (const (- 1.0 (/ amount 200.0))) (scale (/ amount 200.0) 
  37. (osc (hz-to-step lfo) 1.0 *waveform* phase))) s)))
  38.  
  39. ; from previous commit
  40. ; arch-tag: 0ee3925a-8016-44db-91e8-8c4b7a9f3992
  41.  
  42.